// 分配用户开始
.user-dialog {
  .el-dialog {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    top: 50%;
    transform: translateY(-50%);
    .el-dialog__body {
      width: 100%;
      padding: 0;
      .el-dialog-body-child {
        width: 100%;
        padding: 12px 24px;
        height: 78vh;
        overflow-y: auto;

        .goods-info-right {
          align-items: flex-start !important;
        }

        .goods-info-left {
          margin-right: 12px;
        }

        .el-form {
          margin: 0 !important;
          .el-form-item {
            width: 236px;
            float: left;
            min-height: 40px; // 修复部分高度没到40px排列错误问题

            &.search-field {
              display: flex;
              position: relative;
              &.role {
                width: 500px;
              }
              &.inventory-check,
              &.inventory-entry,
              &.inventory-out,
              &.inventory-move {
                width: 360px;
              }

              &.seven-per-row::after {
                width: 98px;
              }

              &.six-per-row::after {
                width: 84px;
              }

              &.five-per-row::after {
                width: 70px;
              }

              &::after {
                content: attr(data-label);
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
                right: calc(100% - 116px); //这个 116 等于  label的宽度-12
                width: attr(width);
                height: 100%;
                font-size: 14px;
                line-height: 16px;
                text-align: right;
                font-weight: normal;
                color: #333333;
                white-space: wrap;
                font-weight: bold;
              }

              .el-form-item__label {
                width: 128px;
                flex-shrink: 0;
              }

              .el-form-item__content {
                flex-grow: 1;

                .el-select,
                .el-date-editor,
                .el-cascader {
                  width: 100%;

                  .el-input__icon.el-range__icon.el-icon-date {
                    margin-left: -10px;
                  }

                  .el-input__icon.el-range__close-icon {
                    margin-right: -5px;
                  }

                  .el-range-separator {
                    width: 14px;
                    padding: 0;
                  }
                }
              }
            }
          }
        }
        .table-wrap {
          padding-top: 0 !important;
          overflow-y: auto;
          .tips-box {
            margin-bottom: 12px;
          }
          .search-all-selected {
            margin-left: 12px;
          }
          .table-box {
            .el-table {
              width: 100%;
              &.empty {
                &::after {
                  content: "暂无数据";
                  position: absolute;
                  top: 50%;
                  left: 50%;
                  transform: translate3d(-50%, 50%, 0);
                  color: #909399;
                }
                // 无数据时 右侧滚动条被盖住 无法滚动
                .el-table__fixed-right {
                  height: calc(
                    100% - 16px
                  ) !important; //设置高优先，以覆盖内联样式
                }
                // 设置表格无数据时高度
                .el-table__empty-block {
                  height: 128px !important;
                }
              }
            }
          }
        }
      }
    }
  }
}
// 分配用户结束

// 分配菜单 开始
.menu-dialog {
  .el-dialog__body {
    width: 100%;
    padding: 0;
    .el-dialog-body-child {
      width: 100%;
      padding: 12px 24px;
      height: 60vh;
      display: flex;
      flex-direction: column;
      .top-box {
        flex-shrink: 0;
        .tips-box {
          margin-bottom: 12px;
        }
        .btn-box {
          .filter-input {
            margin-left: 12px;
          }
        }
      }
      .permission-list {
        flex-grow: 1;
        padding: 12px;
        border: 1px solid #ccc;
        border-radius: 4px;
        margin-top: 12px;
        width: 100%;
        overflow-y: auto;
      }
    }
  }
}
// 分配菜单结束

// 添加在body的dialog 公共样式
.xiaobu-form-dialog {
  .el-dialog {
    .el-dialog__body {
      width: 100%;
      padding: 0;
      &:after {
        visibility: hidden;
        display: block;
        font-size: 0;
        content: " ";
        clear: both;
        height: 0;
      }
      .el-dialog-body-child {
        width: 100%;
        min-height: 300px;
        max-height: 60vh;
        padding: 12px 24px;
        overflow-y: auto;

        .goods-info-right {
          align-items: flex-start !important;
        }

        .goods-info-left {
          margin-right: 12px;
        }

        .tips-icon {
          font-size: 24px;
          margin-left: 12px;
          color: $mainColor;
        }
        .edit-box {
          padding-bottom: 12px;
        }
        .el-form {
          .el-form-item {
            float: left;
            min-height: 40px; // 修复部分高度没到40px排列错误问题
            &.all {
              width: 100%;
            }
            &.half {
              width: 50%;
            }
            &.order {
              .el-form-item__content {
                height: 40px !important;
              }
            }
            .el-form-item__content {
              position: relative;
              .get-code {
                position: absolute;
                top: 0;
                right: 0;
                padding: 0 6px;
                right: 12px;
                font-size: 16px;
                color: #409eff;
                line-height: 40px;
                cursor: pointer;
                z-index: 9;
                background: transparent;
                border: none;
                height: 40px;
                text-align: right;
                min-width: unset;
                & + .el-input {
                  .el-input__inner {
                    padding-right: 178px;
                  }
                  .el-input__suffix {
                    right: 148px;
                    line-height: 48px;
                  }
                }
              }
              .el-input,
              .el-input-number {
                height: 40px !important;
              }
              .content-label {
                position: absolute;
                right: calc(100% + 12px);
                width: 106px;
                line-height: 18px;
                text-align: right;
                background: #fff;
                color: #606266;
                &.one-line {
                  line-height: 40px;
                  &.required::after {
                    top: 50%;
                    transform: translateY(-50%);
                  }
                }
                &.three {
                  width: 46px;
                }
                &.four {
                  width: 60px;
                }
                &.five {
                  width: 80px;
                }
                &.six {
                  width: 90px;
                }
                &.required::after {
                  content: "*";
                  position: absolute;
                  right: 100%;
                  top: 0;
                  line-height: 18px;
                  color: #f56c6c;
                }
              }
              .el-select,
              .el-cascader,
              .el-date-editor {
                width: 100%;
              }
            }
          }
        }
      }
    }
  }
}
